package com.victualler.core.config.permission.controller.impl;

import com.victualler.core.base.controller.impl.BaseRestControllerImpl;
import com.victualler.core.config.permission.controller.RolePermissionInfoController;
import com.victualler.core.config.permission.dto.request.RolePermisisonSaveRequestDto;
import com.victualler.core.config.permission.entity.RolePermissionInfoDao;
import com.victualler.core.config.permission.repository.RolePermissionInfoQueryRepository;
import com.victualler.core.config.permission.repository.RolePermissionInfoRepository;
import com.victualler.core.config.permission.service.RolePermissionInfoService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: Guoshichang
 * @discription:    
 */
@RestController
@RequestMapping("/core/config/permission/rolePermission")
public class RolePermissionInfoControllerImpl extends BaseRestControllerImpl<RolePermissionInfoDao,RolePermissionInfoRepository,RolePermissionInfoQueryRepository,RolePermissionInfoService> implements RolePermissionInfoController {
    /**
     * @author Guoshichang
     * @since 21:46 on 2018/9/9.
     * @param rolePermisisonSaveRequestDto
     * @Function  保存角色的权限列表
     */
    @RequestMapping("/savePermissionsByRoleId")
    public void savePermissionsByRoleId(@RequestBody RolePermisisonSaveRequestDto rolePermisisonSaveRequestDto) {
        this.baseService.savePermissionsByRoleId(rolePermisisonSaveRequestDto);
    }
}
